PLCÀÇ Ladder¸¶Âù°¡Áö·Î ON Delay TimerÀÇ ¿ªÇÒÀ» ÇÏ´Â ½ºÅ©¸³Æ®¸¦ ¸¸µé ¼ö ÀÖ´Ù.
If ( $DI_0000 == OFF && flag ==0 ) return;
If ( $DI_0000 == ON && flag ==0 ) {
startyear = @GetDateYear();
startmon = @GetDateMon();
startday = @GetDateDay();
starthour = @GetTimeHour();
startmin = @GetTimeMin();
startsec = @GetTimeSec();
startcount=@GetMinCount(startyear, startmon, startday, starthour, startmin);
flag = 1;
}
if ( flag == 1 ){
curryear = @GetDateYear();
currmon = @GetDateMon();
currday = @GetDateDay();
currhour = @GetTimeHour();
currmin = @GetTimeMin();
currsec = @GetTimeSec();
endcount=@GetMinCount(curryear, currmon, currday, currhour, currmin);
hap = endcount – startcount;
if ( currsec >= startsec) {
hap = (hap*60) + (currsec – startsec);
}
else {
hap = (hap*60) + (60-startsec) + endsec;
}
if ( hap >= $SETDEALYTIME ){
$OUTPUT = 1;
flag = 0;
}
}
À§¿Í °°ÀÌ Çϸé DI_0000À̶ó´Â µðÁöÅÐ ÀÔ·Âűװ¡ Çѹø ONÀÇ ÀԷ½ÅÈ£¸¦ ¹ÞÀ¸¸é SETDELAYTIME ÀÌÈÄ¿¡ OUTPUT Ãâ·Âű׷ΠÃâ·ÂÇØÁØ´Ù.
OFF DELAY TIMER´Â ON ´ë½Å¿¡ OFF·Î OFF´ë½Å¿¡ ONÀ¸·Î ´ëüÇÏ¸é µÈ´Ù.